Micron Document
🎖️GitЯра🎖️


Displaying Raw • View renderedDownload

core/network/README.md 4d4070c8e1ed73a56ee2f054300a0f62e3fe2e62 (4d4070c8) Text, 2.81 KB

Tc9d1d9# `:core:network`

Tc9d1d9## Overview
The Ta5d6ff`:core:network` module handles all internet-based communication, including fetching firmware metadata, device hardware definitions, and map tiles (in the Ta5d6ff`fdroid` flavor). It also provides the shared radio transport layer (Ta5d6ff`TcpTransport`/Ta5d6ff`TcpRadioTransport`, Ta5d6ff`SerialTransport`, Ta5d6ff`BleRadioTransport`).

Tc9d1d9## Key Components

Tc9d1d9### 1. `Ktor` Client
The module uses **Ktor** as its primary HTTP client for high-performance, asynchronous networking.

Tc9d1d9### 2. Remote Data Sources
Tff7b72- **`FirmwareReleaseRemoteDataSource`**: Fetches the latest firmware versions from GitHub or Meshtastic's metadata servers.
Tff7b72- **`DeviceHardwareRemoteDataSource`**: Fetches definitions for supported Meshtastic hardware devices.

Tc9d1d9### 3. Shared Transports
Tff7b72- **`TcpTransport`** (Ta5d6ff`transport/`) + **`TcpRadioTransport`** (Ta5d6ff`radio/`): Multiplatform TCP transport and its Ta5d6ff`RadioTransport` adapter.
Tff7b72- **`SerialTransport`**: JVM-shared USB/Serial transport powered by jSerialComm.
Tff7b72- **`BleRadioTransport`** (Ta5d6ff`radio/`): The Ta5d6ff`RadioTransport` implementation for Bluetooth devices.
Tff7b72- **`BaseRadioTransportFactory`**: Common factory for instantiating the KMP transports.

Tff7b72> **BLE:** the `RadioTransport` implementation (`BleRadioTransport`) lives **here** in `radio/`; it delegates to the lower-level Kable connection primitives (`BleConnection`, `BleScanner`, `BluetoothRepository`, …) provided by [`:core:ble`](../ble/README.md). `BaseRadioTransportFactory` instantiates it when an address with the `x` (or `!`) prefix is resolved.


Tc9d1d9## Dependency Graph

<!--region graph-->
Ta5d6ff```Ta5d6ffmermaid
Ta5d6ffgraph TB
:core:network[network]:::kmp-library
:core:network --> :core:repository
:core:network -.-> :core:common
:core:network -.-> :core:di
:core:network -.-> :core:model
:core:network -.-> :core:ble
:core:network -.-> :core:testing

classDef android-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-application-compose fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef compose-desktop-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef android-library fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-library-compose fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-test fill:#A0C4FF,stroke:#000,stroke-width:2px,color:#000;
classDef jvm-library fill:#BDB2FF,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library-compose fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef unknown fill:#FFADAD,stroke:#000,stroke-width:2px,color:#000;

Ta5d6ff```
<!--endregion-->

Served by rngit 1.5.2 - Generated in 0.14s